//
//  ViewController.m
//  HKDemo
//
//  Created by LiuYing on 2018/8/3.
//  Copyright © 2018年 SSK. All rights reserved.
//

#import "ViewController.h"
#import "MCHealthManager.h"
#import "SSKAlertHelper.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    
    MCHealthManager *manager = [MCHealthManager defaultManager];
    
    [manager readStepsWithQueryType:MCHealthQueryTypeToday
                               sort:MCHealthResultSortObverse
                            results:^(NSArray<MCStepItem *> * _Nullable steps, NSError * _Nullable error) {
                                [steps enumerateObjectsUsingBlock:^(MCStepItem * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
                                    NSLog(@"%@", obj.step);
                                }];
                            }];
   
    
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
